﻿
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>fu-date-demo</title>
<script type="text/javascript" src="fu-date.js"></script>
<script type="text/javascript">

  function testDate(){
    var today = new Date();
	//格式化
	var ymdhmsDate=DateUtil.toYMDHMS(today);
	var ymdDate=DateUtil.toYMD(today);
	var hmsDate=DateUtil.toHMS(today);
	
	document.write("YMDHMS格式的日期:"+ymdhmsDate+"<br/>");
	document.write("YMD格式的日期:"+ymdDate+"<br/>");
	document.write("HMS格式的时间:"+hmsDate+"<br/><br/>");
	
	//
	var newDate = DateUtil.parseToDate(ymdhmsDate);
	var longDate= DateUtil.parseToLong(ymdhmsDate);
	document.write("newDate:"+newDate+"<br/>");
	document.write("longDate:"+longDate+"<br/><br/>");
	
	var offsetOfWeek=DateUtil.offsetOfWeek(today);
	var firstOfWeek=DateUtil.firstOfWeek(today);
	document.write("offsetOfWeek:"+offsetOfWeek+"<br/>");
	document.write("firstOfWeek:"+firstOfWeek+"<br/>");
	
	
  }
  
  testDate();
</script>

<body> 

</body>
</html>
